Temporary performance degradation

We are currently experiencing service degradation and working on resolving this. Thank you for your patience and understanding.

Telegraf

Platform:

Channel Revision Published Runs on
latest/edge 12 03 Jun 2021
Ubuntu 20.04
juju deploy telegraf-k8s --channel edge

Default configuration

By default, the charm will have telegraf run with a very basic, minimalist configuration:

[global_tags]
[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  debug = false
  quiet = false
  logfile = ""
  hostname = ""
  omit_hostname = false
[[inputs.internal]]
  collect_memstats = true
[[outputs.prometheus_client]]
  listen = ":9103"

Manually updating the telegraf configuration

The telegraf configuration can be updated by injecting raw configuration snippets into juju. For instance, to define the input plugins:

$ juju config telegraf inputs = '[[inputs.internal]]
  collect_memstats = true
[[inputs.github]]
  repositories = ["influxdata/telegraf"]'

This can be tedious to run in a CLI. A better way is to write the inputs config into e.g. inputs.conf, and use it directly with the juju command:

juju config telegraf inputs=@inputs.conf

The same applies to global tags and aggregators.

Updating the telegraf configuration with relations

Telegraf can be related to other charms thanks to relation.
For instance, the postgresql input plugin will be configured when telegraf joins a pg relation:

$ juju relate telegraf:pg postgresql:db